package cn.fancy.sdk.entity;

import org.json.JSONObject;



public class Result implements JsonParseInterface
{

	public static final int IS_OK = 0;
	
	private final String _Result_Jason_Name = "Result";
	
	private final String _resultCode = "a";   
    private final String _resultDesc = "b";
	
	
    public int resultCode=Integer.MIN_VALUE;
	public String resultDesc="";
    
    
	@Override
	public JSONObject buildJson() {
		
		return null;
	}

	@Override
	public void parseJson(JSONObject json) 
	{
		if(json==null) return;
		
		JSONObject myJason = (JSONObject)json.opt(getShortName());

		if(myJason!=null)
		{
		  resultCode = myJason.optInt(_resultCode, Integer.MIN_VALUE);
		  resultDesc = myJason.optString(_resultDesc,"");

		}
	}

	@Override
	public String getShortName() 
	{
		return _Result_Jason_Name;
	}

}
